import { request } from '@/utils/request.js'

// 商品列表
export function apiGetProductList(data = {}) {
	return request({
		url: "/product/list",
		data
	})
}

// 商品详情
export function apiGetProductDetail(data = {}) {
	return request({
		url: "/product/detail",
		data
	})
}

// 商品评论
export function apiGetProductComment(data = {}) {
	return request({
		url: "/productComment/list",
		data
	})
}

// 商品收藏
export function collection(data = {}) {
	return request({
		url: "/product/collection",
		data,
		method: "post",
	})
}

// 移出收藏
export function collectionCancel(data = {}) {
	return request({
		url: "/collectionCancel",
		data,
		method: "post",
	})
}

// 获取商品分享链接
export function apiGetWebUrl(data = {}) {
	return request({
		url: "/product/getWebUrl",
		data
	})
}

// 获取商品分享海报二维码
export function apiGetProductPosterV2(data = {}) {
	return request({
		url: "/product/getProductPosterV2",
		data
	})
}
